<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1" %>
<%@ page import="java.util.Date" %>
<%@ page import="calendar.Event" %>
<%@ page import="utils.Functions" %>
<%@ include file="header.jsp" %>
<%@ include file="htmlheader.jsp" %>
<div width="100%" height="100%" align="center" style="display: none;" class="boxContainer" id="boxContainer">
	<div style="display: none;" id="animDiv" class="box">
	  <p>
	  Details.
	  </p>
	</div>
</div>
<script type="text/javascript">
  //Note that you have to require "dojo.fx" to use the wipe methods. 
  //These are not included in the base.
  dojo.require("dijit.Dialog");
  var wipeOut = dojo.fx.wipeOut({node: "animDiv",duration: 1000});
  var wipeIn = dojo.fx.wipeIn({node: "animDiv",duration: 1000});
  var currentAnimation;
  
  function doAnimation(index) {
    switch(index) {
      case 1:
      	dojo.byId("boxContainer").style.display='none';
        currentAnimation = wipeOut;
        break;
      case 2: 
      	dojo.byId("boxContainer").style.display='';
        currentAnimation = wipeIn;
        break;
      case 3:
        //Chain two animations to run in sequence.
        //Note the array passed as an argument.
        currentAnimation = dojo.fx.chain([wipeOut, wipeIn, wipeOut, wipeIn]);
        break;
    }
    //Play the animation. Without this call, it will not run.
    currentAnimation.play();
  }
  
  function pauseAnimation(){
    if(currentAnimation && currentAnimation.status() == "playing"){
      currentAnimation.pause();
    }
  }
  function resumeAnimation(){
    if(currentAnimation && currentAnimation.status() == "paused"){
      currentAnimation.play();
    }
  }
</script>

    <div id="calendar">
	<%
	String view = request.getParameter("view");
	if (utils.Functions.isNullOrEmpty(view) || view.equals("month")) {
		%><%@ include file="calendar_month.jsp" %><%
	} else if (view.equals("month")) {
		%><%@ include file="calendar_week.jsp" %><%
	} else if (view.equals("day")) {
		%><%@ include file="calendar_day.jsp" %><%
	} else if (view.equals("event")) {
		%><%@ include file="calendar_event.jsp" %><%
	}
	%>
    </div>


</body>
</html>